<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改密码</title>
<script type="text/javascript" src="${ctx }/js/jquery.min.js"></script>
<script type="text/javascript">
	function restPwd(){
		var f = $('#dataForm');
		var data = f.serialize();
		$.ajax({
			type:'post',
			url:'${ctx}/user/restPwd',
			data:data,
			dataType:'json',
			success:function(result){
				alert(result.msg);
				if(result.sus){
					window.location.href="${ctx}/sys/login";
				}
			}
			
		});
	}
</script>
</head>
<body>
	<center>
		<form id="dataForm">
			<input type="hidden" name="id" value="${id }">
			<table>
				<tr>
					<td align="right">新密码</td>
					<td>
						<input type="password" name="password"/>
					</td>
				</tr>
				<tr>
					<td align="right">确认密码</td>
					<td>
						<input type="password" name="confirmPwd"/>
					</td>
				</tr>
				<tr>
					<td colspan="2" align="center">
						<input onclick="restPwd()" type="button" value="确认修改">
					</td>
				</tr>
			</table>
		</form>
	</center>
</body>
</html>